Skip to main content
Version: 1.0.2

Vowpal Wabbit

VowpalWabbitRegressor

from synapse.ml.vw import *

vw = (VowpalWabbitRegressor()
.setLabelCol("Y1")
.setFeaturesCol("features")
.setPredictionCol("pred"))

vwRegressor = (VowpalWabbitRegressor()
.setNumPasses(20)
.setPassThroughArgs("--holdout_off --loss_function quantile -q :: -l 0.1"))
Python API: VowpalWabbitRegressorScala API: VowpalWabbitRegressorSource: VowpalWabbitRegressor

VowpalWabbitContextualBandit

from synapse.ml.vw import *

cb = (VowpalWabbitContextualBandit()
.setPassThroughArgs("--cb_explore_adf --epsilon 0.2 --quiet")
.setLabelCol("cost")
.setProbabilityCol("prob")
.setChosenActionCol("chosen_action")
.setSharedCol("shared_features")
.setFeaturesCol("action_features")
.setUseBarrierExecutionMode(False))
Python API: VowpalWabbitContextualBanditScala API: VowpalWabbitContextualBanditSource: VowpalWabbitContextualBandit